/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004-2005 ActivMedia Robotics LLC
Copyright (C) 2006-2010 MobileRobots Inc.
Copyright (C) 2011-2015 Adept Technology, Inc.
Copyright (C) 2016-2018 Omron Adept Technologies, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

If you wish to redistribute ARIA under different terms, contact 
Adept MobileRobots for information about a commercial version of ARIA at 
robots@mobilerobots.com or 
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.Aria;

public class ArMD5Calculator {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  public ArMD5Calculator(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(ArMD5Calculator obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        AriaJavaJNI.delete_ArMD5Calculator(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static void toDisplay(SWIGTYPE_p_unsigned_char digestBuf, long digestLength, String displayBuf, long displayLength) {
    AriaJavaJNI.ArMD5Calculator_toDisplay(SWIGTYPE_p_unsigned_char.getCPtr(digestBuf), digestLength, displayBuf, displayLength);
  }

  public static boolean calculateChecksum(String fileName, SWIGTYPE_p_unsigned_char md5DigestBuffer, long md5DigestBufferLen) {
    return AriaJavaJNI.ArMD5Calculator_calculateChecksum(fileName, SWIGTYPE_p_unsigned_char.getCPtr(md5DigestBuffer), md5DigestBufferLen);
  }

  public ArMD5Calculator(ArFunctor1_CString secondFunctor) {
    this(AriaJavaJNI.new_ArMD5Calculator__SWIG_0(ArFunctor1_CString.getCPtr(secondFunctor), secondFunctor), true);
  }

  public ArMD5Calculator() {
    this(AriaJavaJNI.new_ArMD5Calculator__SWIG_1(), true);
  }

  public void reset() {
    AriaJavaJNI.ArMD5Calculator_reset(swigCPtr, this);
  }

  public void append(String str) {
    AriaJavaJNI.ArMD5Calculator_append(swigCPtr, this, str);
  }

  public SWIGTYPE_p_unsigned_char getDigest() {
    long cPtr = AriaJavaJNI.ArMD5Calculator_getDigest(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
  }

  public ArFunctor1_CString getFunctor() {
    long cPtr = AriaJavaJNI.ArMD5Calculator_getFunctor(swigCPtr, this);
    return (cPtr == 0) ? null : new ArFunctor1_CString(cPtr, false);
  }

  public ArFunctor1_CString getSecondFunctor() {
    long cPtr = AriaJavaJNI.ArMD5Calculator_getSecondFunctor(swigCPtr, this);
    return (cPtr == 0) ? null : new ArFunctor1_CString(cPtr, false);
  }

  public void setSecondFunctor(ArFunctor1_CString secondFunctor) {
    AriaJavaJNI.ArMD5Calculator_setSecondFunctor(swigCPtr, this, ArFunctor1_CString.getCPtr(secondFunctor), secondFunctor);
  }

  public final static int DIGEST_LENGTH = AriaJavaJNI.ArMD5Calculator_DIGEST_LENGTH_get();
  public final static int DISPLAY_LENGTH = AriaJavaJNI.ArMD5Calculator_DISPLAY_LENGTH_get();

}
